#ifndef _SHADER_H_
#define _SHADER_H_

#include "Math.h"

typedef std::vector<GLuint>		StateVector;

class Shader 
{
public:
	GLuint	m_program;
	GLuint	m_vertexShader;
	GLuint	m_fragmentShader;

	char	m_fileVS[255];
	char	m_fileFS[255];
	bool	m_isBlend;
	StateVector m_states;
	
	// Vertex attributes
	GLint	m_positionAttribute;
	GLint	m_normAttribute;
	GLint	m_uvAttribute;
	
	// Object uniform
	GLint	m_wvpUniform;
	GLint	m_wUniform;

	// Textures uniforms
	GLint	m_textureUniform;
	GLint	m_multiTexturesUniform[4];
	
	// Camera uniform
	GLint	m_cameraPosUniform;
	GLint	m_cameraWMatrixUniform;

public:
	Shader();
	~Shader();

	int Init ();
	void CleanUp ();
	void PrepareVariables (Matrix &W);
	void ToggleStates(bool bEnable);
	void SetVSFileName(const char * strVS);
	void SetFSFileName(const char * strFS);
};

typedef std::vector<Shader *>		ShaderVector;

#endif